home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML ConsoleMax.sea / XML ConsoleMax / Required / esc.jar / com / extensibility / util / BasicEnumerator.class (.txt) < prev    next >
Encoding:
Java Class File  |  2000-06-30  |  668 b   |  33 lines

  1. package com.extensibility.util;
  2.  
  3. import java.util.Enumeration;
  4.  
  5. public class BasicEnumerator implements Enumeration {
  6.    Object onDeck;
  7.    boolean init;
  8.  
  9.    private void init() {
  10.       if (!this.init) {
  11.          this.onDeck = this.getNext();
  12.          this.init = true;
  13.       }
  14.  
  15.    }
  16.  
  17.    public boolean hasMoreElements() {
  18.       this.init();
  19.       return this.onDeck != null;
  20.    }
  21.  
  22.    public Object nextElement() {
  23.       this.init();
  24.       Object var1 = this.onDeck;
  25.       this.onDeck = this.getNext();
  26.       return var1;
  27.    }
  28.  
  29.    protected Object getNext() {
  30.       return null;
  31.    }
  32. }
  33.